package com.dingyang.learn.handmadespringframework.springframework;

/**
 * bean定义
 * @author dingyang
 */
public class BeanDefinition {

    /**
     * bean类
     */
    private Class beanClass;

    /**
     * 模式
     */
    private String scope = "singleton";

    /**
     * 懒加载
     */
    private boolean lazy;

    public Class getBeanClass() {
        return beanClass;
    }

    public void setBeanClass(Class beanClass) {
        this.beanClass = beanClass;
    }

    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public boolean isLazy() {
        return lazy;
    }

    public void setLazy(boolean lazy) {
        this.lazy = lazy;
    }

    public boolean isSingleton() {
        return "singleton".equals(scope);
    }

}
